package fr.uniscol.siecle.dao.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import fr.uniscol.siecle.model.Eleve;

public class EleveRowMapper implements RowMapper<Eleve> {

	@Override
	public Eleve mapRow(ResultSet rs, int rowNum) throws SQLException {
		
		Eleve e = new Eleve();
		
		e.setId(rs.getString("ID"));
		e.setElenoet(rs.getString("ELENOET"));
		e.setId_national(rs.getString("ID_NATIONAL"));
		e.setNom(rs.getString("NOM"));
		e.setPrenom(rs.getString("PRENOM"));
		e.setDate_naissance(rs.getString("DATE_NAISSANCE"));
		e.setCode_pays(rs.getString("CODE_PAYS"));
		
		return e;
	}
}
